<template>
  <el-table :data="GoodsOederList" border style="width: 100%">
    <el-table-column prop="goodsOrderReceiver" label="姓名" width="180">
    </el-table-column>
    <el-table-column prop="goodsOrderTel" label="联系电话" width="180">
    </el-table-column>
    <el-table-column prop="goodsOrderAddress" label="收货地址">
    </el-table-column>
    <el-table-column prop="goodsOrderState" label="状态"> </el-table-column>
    <el-table-column prop="goodsOrderDate" label="交易时间"> </el-table-column>
    <el-table-column label="操作" align="center" width="200">
      <template slot-scope="scope">
        <el-row>
          <!-- <el-popover placement="right" width="400" trigger="click">
            <el-form ref="GoodsOeders" :model="GoodsOeders" label-width="120px">
              <el-form-item label="商品名">
                <el-input v-model="Goods.goodsName"></el-input>
              </el-form-item>
              <el-form-item label="商品品类">
                <el-input v-model="Goods.goodsType"></el-input>
              </el-form-item>
              <el-form-item label="商品材质">
                <el-input v-model="Goods.goodsMaterial"></el-input>
              </el-form-item>
              <el-form-item label="商品适用规格">
                <el-input v-model="Goods.goodsDogtype"></el-input>
              </el-form-item>
              <el-form-item label="商品专属规格">
                <el-input v-model="Goods.goodsExdogtype"></el-input>
              </el-form-item>
              <el-form-item label="商品包装规格">
                <el-input v-model="Goods.goodsPackage"></el-input>
              </el-form-item>
              <el-form-item label="商品口味">
                <el-input v-model="Goods.goodsFlavor"></el-input>
              </el-form-item>
            </el-form>
            <el-button
              size="mini"
              icon="el-icon-search"
              slot="reference"
              circle
              @click="handleQuery(scope.$index, scope.row)"
            ></el-button>
          </el-popover> -->
          <el-button
            size="mini"
            icon="el-icon-edit"
            circle
            @click="handleEdit(scope.$index, scope.row)"
          ></el-button>
        </el-row>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>

import {getGoodsOrder} from "@/services/GoodsOrderService.js"

export default {
  data() {
    return {
      GoodsOederList: [],
      GoodsOeders:{
        goodsOrderId:'',
        goodsOrderReceiver:'',
        goodsOrderTel:'',
        goodsOrderAddress:'',
        goodsOrderState:'',
        goodsOrderDate:'',
        goodsOrderPrice:'',
        goodsOrderNumber:''
      }
    };
  },
  async created() {
    var resp = await getGoodsOrder();
    console.log("=========="+resp);
    this.GoodsOederList = resp;
  },
  methods:{
    // handleQuery(index, row) {
    //   // console.log(row);
    //   this.Goods = row;
    // },
    handleEdit(index, row) {
      this.$router.push({
        name: "UpdateGoodsOrder",
        params: { goodsId: row.goodsId },
      });
    },
  },
};
</script>

<style>
</style>